<script>on mouseUpput cd fld "index 0" into cd fld "index"end mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>12</left>
<top>160</top>
<right>112</right>
<bottom>182</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Convert</name>
<script>on mouseUplock screenput rect of btn "frame" into rset rect of btn "progress" to item 1 of r,item 2 of r, ¬item 1 of r, item 4 of rput item 3 of r - item 1 of r into wput empty into cd fld "progress"show btn "cover"show btn "progress"show btn "frame"show btn "Stop"show cd fld "progress"unlock screen--put cd fld "index" into indexput cd fld "in" into aput empty into bput false into isBoldput false into isItalicput the number of chars of a into nput the number of lines of a into nn--put 0 into iirepeat with i=1 to nif i mod 16 = 0 then set cursor to busyif the mouse is down and the mouseLoc is within ¬the rect of btn "Stop" thensend restore to this cardexit mouseUp --∆end if--put textStyle of char i of cd fld "in" into s--if "Bold" is in s and not isBold thenput "<b>" after bput true into isBoldelse if "Bold" is not in s and isBold thenput "</b>" after bput false into isBoldend if--if "Italic" is in s and not isItalic thenput "<i>" after bput true into isItalicelse if "Italic" is not in s and isItalic thenput "</i>" after bput false into isItalicend if--put char i of a into cif c is return thenlock screenadd 1 to iiput ii && "of" && nn into cd fld "progress"put rect of btn "progress" into rput item 1 of r + trunc(w*i/n) into item 3 of rset rect of btn "progress" to runlock screenput "<br>" & return after belse if c ≥ " " thenput line (charToNum(c)-31) of index into xput char 5 to (number of chars of x) of x after bend ifend repeat--put cd fld "header" & return & b & return & cd fld "footer" ¬into cd fld "out"send restore to this cardend mouseUp</script>